1. Field of the Invention
The present invention relates to a numerical controller that controls a machine tool, the numerical controller having a program resuming function for facilitating re-execution of a machining program after execution suspension of the machining program.
2. Description of the Related Art
A numerical controller having a program resuming function for facilitating re-execution of a machining program after execution suspension of the machining program has been publicly known.
In the conventional program resuming function, for example, as disclosed in Japanese Patent Application Laid-open No. 2009-53801, in preparation for suspension of machining of a workpiece, program resumption block data for resuming the machining of the workpiece is acquired during the machining of the workpiece. The program resumption block data includes data necessary for a program resumption such as a block number of a block being executed in a machining program, a start point and an end point of the block being executed, various kinds of modal information of the block being executed, a number of a master program and a block position for calling a sub-program, and a total number of blocks from the master program to the block being executed.
However, to actually resume workpiece, it is necessary to restore, according to a block in which the machining is resumed, not only a state of a block commanded by the numerical controller but also states of a programmable machine controller section (PMC section) to which an input-output interface is connected, a programmable logic controller (PLC) or a computer connected to an interface of a numerical control section (NC section), or the like and peripheral machine sections connected to the programmable machine controller section, the programmable logic controller, or the computer (hereinafter collectively referred to as “PMC section”).
For restoring the state of the PMC section, an operator checks contents of a machining program, selects necessary auxiliary functions (signal state changing commands), and manually command the auxiliary functions. This technique is known, though there is no description in above mentioned Japanese Patent Application Laid-open No. 2009-53801. If the machining of the workpiece is resumed while the state of the PMC section cannot be correctly restored, it is likely that the workpiece and tools are broken.
As measures against this likelihood, Japanese Patent Application Laid-open No. 6-202723 discloses a method of, in re-executing a machining program from a position of suspension of the machining program, comparing states of a machine during the suspension and during the re-execution of the machining program and generating a restoring program to enable a state of the machine to be returned to the state during the suspension. Japanese Patent Application Laid-open No. 10-43953 (corresponding to U.S. Pat. No. 5,984,506) discloses a method of storing control data representing a machining state while machining is executed and returning the control data when the machining is resumed.
In Japanese Patent Application Laid-open No. 6-202723 mentioned above, a number of a tool in use, the number of revolutions of a spindle, and an M command state are stored during the machining suspension and commands for restoring the number of the tool in use, the number of revolutions of the spindle, and the M command state are generated as a restoring program. However, when there is a function of changing the state of the machine not via the commands, it is difficult to restore the state of the machine. For example, when there is a function of changing a feed speed override and a spindle speed override according to a cutting load, it is difficult to restore states of the overrides only from the information explained above.
The technique described in Japanese Patent Application Laid-open No. 10-43953 mentioned above relates to a method of classifying the control data into static control data and dynamic control data and storing and restoring the control data. The dynamic control data is always stored to restore the state of the machine during the machining suspension. However, the technique is based on the premise that all data are unitarily managed. For example, when necessary data is separated and present in the NC section and the PMC section and independently managed in the NC section and the PMC section, the technique cannot be adapted to a resumption and execution of the machining program.
Some command is described as a single auxiliary function on a program but is recognized as an aggregate of a series of plurality of machine operation commands in a numerical controller. Japanese Patent Application Laid-open No. 2000-35815 discloses that, if the numerical controller executes the series of the plurality of machine operation commands, when an operation is suspended halfway in the auxiliary function, the remaining machine operation command is re-executed. However, this technique is not for restoring the state of the machine but for re-executing the remaining operation of the suspended auxiliary function.